package com.csce.domain.entity.go_score;

import com.doudou.core.lang.Option;
import com.doudou.core.number.DecimalUtil;
import com.osce.common.annotation.Excel;
import com.osce.common.core.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.math.BigDecimal;

/**
 * 妇产科考试考场学生-分数对象 go_score_ex_exam_score
 *
 * @author zzx
 * @since 2024-05-18
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@ToString
@EqualsAndHashCode(callSuper = true)
public class GoScoreExExamScore extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 打分编号
     */
    @Excel(name = "打分编号")
    @ApiModelProperty("打分编号")
    private Long markId;

    /**
     * 步骤编号
     */
    @Excel(name = "步骤编号")
    @ApiModelProperty("步骤编号")
    private Long stepId;

    /**
     * 分数
     */
    @Excel(name = "分数")
    @ApiModelProperty("分数")
    private BigDecimal score;

    public BigDecimal getScore(){
        return Option.of(this.score).get(DecimalUtil.newZero());
    }

}
